<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
//Route::resource('index','index/index');
////Route::pattern('name','\w+');
////Route::get('hello/:id','index/hello',['after_behavior'=>'\app\index\behavior\ReadInit', 'before_behavior'=>'\app\index\behavior\RouteCheck']);
//return [
////    '/' => 'index/test',
//    '__pattern__' => [
//        'name' => '\w+',
//    ],
//    '[hello]'     => [
//        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
//        ':name' => ['index/hello', ['method' => 'post']],
//    ],
//
//];
//Route::group('thumb',function(){
    Route::get('thumb/:config/:path/[:query]', 'thumber/index/index', [
        'ext' => 'jpg|png|gif'
    ],[
        'config' => '\w+',
        'path' => '[a-zA-z0-9\/\%\=]+',
        'query' => '[a-zA-z0-9,_]+',
    ]);
    Route::miss(function(){
        return '请求错误';
    });
//},['ext' => 'jpg|png|gif']);